import request from '@/utils/request'

// 查询卡密列表
export function listCryptocard(query) {
  return request({
    url: '/cryptocard/cryptocard/list',
    method: 'get',
    params: query
  })
}

// 查询卡密详细
export function getCryptocard(id) {
  return request({
    url: '/cryptocard/cryptocard/' + id,
    method: 'get'
  })
}

// 新增卡密
export function addCryptocard(data) {
  return request({
    url: '/cryptocard/cryptocard',
    method: 'post',
    data: data
  })
}

// 修改卡密
export function updateCryptocard(data) {
  return request({
    url: '/cryptocard/cryptocard',
    method: 'put',
    data: data
  })
}

// 删除卡密
export function delCryptocard(id) {
  return request({
    url: '/cryptocard/cryptocard/' + id,
    method: 'delete'
  })
}
